package com.bootdo.coach.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.coach.dao.TabDeviceTypeMapper;
import com.bootdo.coach.dao.ext.ExtTabDeviceTypeMapper;
import com.bootdo.coach.domain.TabDeviceType;
import com.bootdo.coach.service.TabDeviceTypeService;


@Service
public class TabDeviceTypeServiceImpl implements TabDeviceTypeService {
    @Autowired
    private TabDeviceTypeMapper mapper;
    @Autowired
    private ExtTabDeviceTypeMapper extMapper;
    
	@Override
	public TabDeviceType selectByPrimaryKey(Long id) {
		return mapper.selectByPrimaryKey(id);
	}
	
	@Override
	public int insertSelective(TabDeviceType record) {
		return mapper.insertSelective(record);
	}
	
	@Override
	public int deleteByPrimaryKey(Long id) {
		return mapper.deleteByPrimaryKey(id);
	}
	
	@Override
	public List<TabDeviceType> selectByDeviceTypeName(String deviceTypeName) {
		return extMapper.selectByDeviceTypeName(deviceTypeName);
	}
	
	@Override
	public int updateByPrimaryKeySelective(TabDeviceType record) {
		return mapper.updateByPrimaryKeySelective(record);
	}
	
	@Override
	public int count(Map<String, Object> params) {
		return extMapper.count(params);
	}

	@Override
	public List<TabDeviceType> list(Map<String, Object> params) {
		return extMapper.list(params);
	}
	
	@Override
	public boolean exitDeviceTypeName(Map<String, Object> params) {
		boolean exit;
        exit = count(params) > 0;
        return exit;
	}
}
